package me.feng3d.tools.helpers
{
	import flash.utils.getTimer;

	import me.feng3d.configs.Context3DBufferIDConfig;
	import me.feng3d.core.base.Geometry;
	import me.feng3d.core.base.ParticleGeometry;
	import me.feng3d.fagalRE.FagalRE;
	import me.feng3d.primitives.PlaneGeometry;

	/**
	 *
	 * @author feng 2015-12-15
	 */
	public class ParticleGeometryHelperTester
	{

		[BeforeClass]
		public static function setUpBeforeClass():void
		{
			//配置3d缓存编号
			FagalRE.addBufferID(Context3DBufferIDConfig.bufferIdConfigs);
		}

		[Test]
		public function testenerateGeometry():void
		{
			//setup the particle geometry
			var plane:Geometry = new PlaneGeometry(15, 15, 1, 1, false);
			var geometrySet:Vector.<Geometry> = new Vector.<Geometry>();
			for (var i:int = 0; i < 20000; i++)
				geometrySet.push(plane);

			var startTime:int = getTimer();

			var particleGeometry:ParticleGeometry = ParticleGeometryHelper.generateGeometry(geometrySet);
			particleGeometry;

			trace(getTimer() - startTime);
		}
	}
}
